Skip to content

fix(release): unblock npm trusted publishing (Node 24 + provenance flags) - #46

Merged
codewizdave merged 1 commit into
mainfrom
release/release-system-stack
Aug 3, 2026
Merged

fix(release): unblock npm trusted publishing (Node 24 + provenance flags)#46
codewizdave merged 1 commit into
mainfrom
release/release-system-stack

Conversation

@martyy-code

Copy link
Copy Markdown
Contributor

Summary

PR #45 fixed the missing version-bump commit, but the publish step still hit ENEEDAUTH. Root cause: pnpm was not routed to the OIDC code path, and Node 22 was older than the npm trusted-publishing prerequisites.

Three changes

  1. release.yml: node-version: 2224. Runner default is already Node 24; pinning 22 predated the trusted-publishing prerequisites (npm CLI ≥ 11.5.1 + Node ≥ 22.14.0).
  2. release.yml: Publish packages step now carries env: NPM_CONFIG_PROVENANCE: 'true'. This forces pnpm down the OIDC publish path.
  3. packages/errors/package.json: add publishConfig: { access: "public", provenance: true }. access: "public" was already being propagated by Changesets, but pulling it into publishConfig here documents the intent and matches the proven pattern in our other release workflows.

Why this should work

The npm trusted publisher on deessejs/errors × release.yml is configured correctly (no environment filter). The previous failures were a tooling artifact, not an npm-side auth issue.

Effect on next merge to main

The release workflow runs again. If OIDC succeeds, @deessejs/errors@1.2.1 is published with provenance, the tag is pushed at the version-bump commit, and the GitHub Release is created.

Files changed

  • .github/workflows/release.yml
  • packages/errors/package.json
  • .changeset/fix-oidc-publish.md

🤖 Generated with Claude Code

…ags)

PR #45 fixed the missing version-bump commit but ENEEDAUTH persisted
on the publish step. Trust on npmjs.com was tightened (no environment
filter), but the workflow was still not signaling OIDC intent to pnpm.

Three aligned changes, mirroring the proven pattern in our other
release workflows:

1. Release workflow: node-version 22 -> 24. The runner already defaults
   to Node 24; pinning 22 was unnecessarily old and predates the npm
   CLI >= 11.5.1 + Node >= 22.14.0 trusted-publishing prerequisites.
2. 'Publish packages' step: add env NPM_CONFIG_PROVENANCE: 'true'.
   pnpm reads this and routes publish through OIDC, not the legacy
   fallback path that requires a token.
3. packages/errors/package.json: add publishConfig.provenance: true.
   Belt + suspenders alongside the env var, and gives npm a default
   intent for provenance attestation on every publish.

Adds a changeset to pass the new ci.yml lint.
@codewizdave
codewizdave merged commit 6bb7ec4 into main Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants